# Contributor: Nulo <alpine@nulo.in>
# Maintainer: Nulo <alpine@nulo.in>
pkgname=scrypt
pkgver=1.3.2
pkgrel=0
pkgdesc="A password-based encryption utility"
url="https://www.tarsnap.com/scrypt.html"
arch="all"
license="BSD-2-Clause"
depends_dev="openssl-dev>3"
makedepends="$depends_dev"
subpackages="$pkgname-doc"
source="https://www.tarsnap.com/scrypt/scrypt-$pkgver.tgz"

# update config sub to support loongarch64 
prepare() { 
	default_prepare 
	update_config_sub 
} 

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
5f2c4f74cec107b08675c5e287c151d633b3a02f12c71d9484ecb14750b3a45b90e2da9dae9090af59346518492aeab01c215961fd592c4f5e5b944f27d9afc7  scrypt-1.3.2.tgz
"
